<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->

<!-- begin header -->
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	class="body-nhan-xet">
<h:head>
<meta charset="UTF-8" />
	<link rel="stylesheet" media="screen and (max-width: 640px)" href="resources/css/nghia-small-screen.css"/>
	<link rel="stylesheet" media="screen and (min-width: 641px) and (max-width: 800px)" href="resources/css/nghia-small-screen.css"/>
	<link rel="stylesheet" media="screen and (min-width: 801px) and (max-width: 1024px)" href="resources/css/nghia-medium-screen.css"/>
	<link rel="stylesheet" media="screen and (min-width: 1025px)" href="resources/css/nghia-large-screen.css"/>
	<link rel="stylesheet" media="screen and (device-aspect-ratio: 40/71)" href="resources/css/nghia-small-screen.css"/>
</h:head>

<!-- Method kiem tra moi khi trang duoc load -->
<f:event listener="#{nhanXetManagedBean.onLoad}" type="preRenderView"></f:event>

<h:body class="body-nhan-xet">
	<h:form class="body-nhan-xet">
		<ui:fragment
			rendered="#{nhanXetManagedBean.isSinhVien == 'show'}">
			<p:inputTextarea rows="6" cols="33" value="#{nhanXetManagedBean.nhanXet}"/>
		
			<br/>
			
			<h:commandButton value="Đăng nhận xét" action="#{nhanXetManagedBean.dangNhanXet}" 
			class="btn btn-primary btn-nhan-xet" style="margin-bottom: 20px;"></h:commandButton>
		</ui:fragment>
		<ui:fragment
			rendered="#{nhanXetManagedBean.isSinhVien == 'hide'}">
		</ui:fragment>
		<h2>Nhận xét của sinh viên</h2>
		<ui:repeat var="nhanXet" value="#{nhanXetManagedBean.listThongTinNhanXet}">
			<div style="margin-bottom: 35px;width: 400px;margin-left: 20px;border: 2px solid #a1a1a1; padding: 10px 40px; 
   										 background: #dddddd;border-radius: 25px;">
				<div style="width: 150px;">
					#{nhanXet.tenTaiKhoan}:
				</div>
				<div style="width: 400px;margin-top: 5px">
					#{nhanXet.noiDungNhanXet}
				</div>
			</div>
		</ui:repeat>
	</h:form>
</h:body>
</html>
